function excelText2JSON(string) {
    const split = string.split('\n')
    const headerList = split[0].split('\t')
    const dataList = split.slice(1).map(item => item.split('\t'))
    const result = []
    for (const data of dataList) {
        const obj = {}
        for (let i = 0; i < headerList.length; i++) {
            obj[headerList[i]] = data[i]
        }
        result.push(obj)
    }
    return result
}

function getLine12(data) {
    const line12 = []
    for (const item of data.订单表) {
        const noPH = data.订单明细表.some(item2 =>
            item2.HTBN === item.合同编号
            && item2.生产类型 === '自制'
            && data.批号表.every(item3 => item3.订单明细ID !== item2.明细ID))
        if (noPH) {
            line12.push(item)
        }
    }
    return line12
}